#include <iostream>
using namespace std;
char str[26];
int num;
void f(int n, char start_char)
{
	int i;
	if (n == 0) {
	cout << '(';
	for (i = 0; i < num; i++)
		if (i != num - 1)
			cout << str[i] << ',';
		else
			cout << str[i] << "),";
		return;
	}

	while (start_char <= 'd') {
		str[num - n] = start_char;
		f(n - 1, ++start_char);
	}
	return;
}

int main()
{
for (num = 1; num <= 4; num++)
	f(num, 'a');
	return 0;
}